package com.knowledge.model.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

public enum ResultCode {
    //定义枚举类型相关的内容信息

    ERROR_USERNAME_PASSWORD(4001,"用户名或密码错误"),
    EMPTY_TOKEN(4002,"token为空"),
    INVALID_TOKEN(4003,"非法token,token不存在或者已经过期"),
    ERROR_PARSE_TOKEN(4004,"token解析错误"),

    FILE_IS_EMPTY(4005,"上传文件不能为空"),

    //文件上传状态
    FILE_UPLOADING(4000,"文件上传中"),
    FILE_UPLOAD_EXISTS(4500,"文件已存在,上传完成"),
    FILE_UPLOAD_FAILED(5000,"文件上传失败"),

    RC200(200,"操作成功"),
    RC400(400,"操作失败");



    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
